﻿namespace NTLib.Core.Exceptions
{
    using Extensions;
    using Strings;
    using System;

    /// <summary>
    /// Raised when multiple instance of a singleton class tried to be instanciate.
    /// </summary>
    /// <seealso cref="System.Exception" />
    public sealed class SingletonException : NTLibException
    {
        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="SingletonException"/> class.
        /// </summary>
        public SingletonException(Type type)
            : base(ExceptionResources.SingletonException.Argument(type), null)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SingletonException"/> class.
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public SingletonException(string message)
            : base(message, null)
        {
        }

        #endregion
    }
}
